package com.appointmentmanager.service;

import java.util.List;

import com.appointmentmanager.model.User;

public interface UserService {

	/**
	 * Returns the current login user
	 */
	User getCurrentUser();
	
	/**
	 * Returns the user with the given id 
	 * 
	 * @param id The user id
	 *
	 */
	User findUser(Long id);
	
	/**
	 * Returns the user with the given email
	 * 
	 * @param email The email of an user
	 * @return
	 */
	User findUser(String email);
	
	/**
	 * Returns all the user within the systems
	 */
	List<User> findAllUsers();
	
	/**
	 * Returns true if the user is successful register, false otherwise.
	 * 
	 * @param username
	 * @param password
	 * @param firstName
	 * @param lastName
	 */
	boolean registerUser(String username, String password, String firstName, String lastName);
		
	/**
	 * Enable the user with given id
	 * 
	 * @param id
	 */
	void enableUser(Long id);
	
	/**
	 * Disable the user with given id
	 * 
	 * @param id
	 */
	void disableUser(Long id);
	
	/**
	 * Check whether the user with the given email is a admin 
	 * 
	 * @param email
	 */
	boolean isAdmin(String email);
}
